home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / YERK / SUPPLEME / MY_STUFF / TIMEMANA.GER < prev    next >
Text File  |  1991-04-29  |  1KB  |  46 lines

  1. create Tinstall popA0 " InsTime" asmcall next,
  2. create Tremove  popA0 " rmvTime" asmcall next,
  3. create Tprime   popD0 popA0 " primeTime" asmcall next,
  4.  
  5. :CLASS time <super object
  6.  
  7.     var            qlink
  8.     int            qtype
  9.     var            tmAddr
  10.     int            tmCount
  11.     var            tmDelay
  12.  
  13.   :M install: ( cfaProc -- errcode) +base >body put: tmAddr
  14.     abs: self Tinstall ;M
  15.  
  16.   :M remove: ( --errcode) abs: self Tremove ;M
  17.  
  18.   :M setDelay: put: tmDelay ;M
  19.  
  20.   :M go: abs: self get: tmDelay Tprime ;M
  21.  
  22.   :M classinit: 1 put: qtype ;M
  23.  
  24. ;CLASS
  25.  
  26.  
  27. \ procedure is to install a procWord, set the delay when the procWord should execute,
  28. \  and when you want to start timing, say schedule:
  29. \ When you're completely done, just remove:
  30.  
  31. \ schedule: might change to time: or something. The classname might also change.
  32.  
  33. rect suz
  34. 100 100 200 200 put: suz
  35.  
  36. time painter time clearer
  37. :proc paintit ( pushPort set: fwind ) paint: suz ( popPort) ;proc
  38. :proc clearit ( pushPort set: fwind ) set: fwind clear: suz draw: suz ( popPort) ;proc
  39. 4000 setdelay: painter
  40. 5000 setdelay: clearer
  41.  
  42. 'c paintit install: painter
  43. 'c clearit install: clearer
  44. : go go: painter go: clearer ;
  45.  
  46.